function FormatDateTime(UnixTime) {
  var date = new Date(UnixTime);

  var m = date.getMonth() + 1;

  var d = date.getDate();

  return m + "/" + d;
}
function startTime(time) {
  const nowTimeDate = new Date(time);

  return nowTimeDate.setHours(0, 0, 0, 0) / 1000;
}
export default function getLinuexTime() {
  var timeData = ["日", "一", "二", "三", "四", "五", "六"];

  var nowTime = Math.round(new Date().getTime() / 1000); //当前unix时间戳

  var nowWeek = new Date().getDay(); //当前星期几（0：星期日）

  var data = []; //储存最后的结果

  for (var i = 0; i < 7; i++) {
    var oneData = {}; //单天的json

    var oneUnix = (nowTime + i * 24 * 60 * 60) * 1000; //获取日期

    oneData.week = timeData[(nowWeek + i) % 7]; //获取周次

    // oneData.time = new Date((nowTime+(i*24*60*60))*1000).format("MM/dd");//获取日期

    // oneData.time = new Date((nowTime+(i*24*60*60))*1000).toLocaleString();//获取日期

    oneData.time = FormatDateTime(oneUnix); //获取日期;

    oneData.unix = startTime(oneUnix);

    data[i] = oneData; //把json加入结果数组
  }
  var timelist = [];
  data[0].week = "今天";
  for (let i = 0; i < 7; i++) {
    timelist.push(data[i]);
  }
  console.log(timelist);
  return timelist;
}
